<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/tag.jsp" %>    
<!DOCTYPE html>
<html lang="zh">
<head>
<%@ include file="/common/meta.jsp" %>
<title>B-JUI 客户端框架</title>
<%@ include file="/common/inc.jsp" %>
<!-- init -->
<script type="text/javascript">
$(function() {
    BJUI.init({
        //loginInfo   : {url:'login.do', title:'登录', width:400, height:200}, // 弹出登录对话框
		loginUrl:"login.do",	// 跳到登录页面
        statusCode  : {ok:200, error:300, timeout:301}, //[可选]
        ajaxTimeout : 5000, //[可选]全局Ajax请求超时时间(毫秒)
        pageInfo    : {pageCurrent:'pageCurrent', pageSize:'pageSize', orderField:'orderField', orderDirection:'orderDirection'}, //[可选]
        keys        : {statusCode:'statusCode', message:'message'}, //[可选]
        ui          : {showSlidebar:true, hideMode:'display'}, //[可选]hideMode:navtab组件切换的隐藏方式，支持的值有’display’，’offsets’负数偏移位置的值，默认值为’display’
        debug       : true,    // [可选]调试模式 [true|false，默认false]
        theme       : 'purple' // 若有Cookie['bjui_theme'],优先选择Cookie['bjui_theme']。皮肤[五种皮肤:default, orange, purple, blue, green]
    })
    //时钟
    var today = new Date(), time = today.getTime()
    $('#bjui-date').html(today.formatDate('yyyy/MM/dd'))
    setInterval(function() {
        today = new Date(today.setSeconds(today.getSeconds() + 1))
        $('#bjui-clock').html(today.formatDate('HH:mm:ss'))
    }, 1000)
})

//console.log('IE:'+ (!$.support.leadingWhitespace))
//菜单-事件
function MainMenuClick(event, treeId, treeNode) {
    if (treeNode.isParent) {
        var zTree = $.fn.zTree.getZTreeObj(treeId)
        
        zTree.expandNode(treeNode)
        return
    }
    
    if (treeNode.target && treeNode.target == 'dialog')
        $(event.target).dialog({id:treeNode.tabid, url:treeNode.url, title:treeNode.name})
    else
        $(event.target).navtab({id:treeNode.tabid, url:treeNode.url, title:treeNode.name, fresh:treeNode.fresh})
        
    event.preventDefault()
}
</script>

</head>
<body>
    <header class="navbar navbar-default" id="bjui-header">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bjui-navbar-collapse">
                <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"><img src="images/logo.png"></a>
        </div>
        <nav class="collapse navbar-collapse" id="bjui-navbar-collapse">
            <ul class="nav navbar-nav navbar-right">
                <li class="datetime"><div><span id="bjui-date"></span><br><i class="fa fa-clock-o"></i> <span id="bjui-clock"></span></div></li>
                <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">我的账户 <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="system/user/toChangePw.do" data-toggle="dialog" data-id="changepwd_page" 
                        	data-mask="true" data-width="400" data-height="250">&nbsp;
                        <span class="glyphicon glyphicon-lock"></span> 修改密码&nbsp;</a></li>
                        <li><a href="system/user/toUpdateUser.do">&nbsp;<span class="glyphicon glyphicon-user"></span> 我的资料</a></li>
                        <li class="divider"></li>
                        <li><a href="logout.do" class="red">&nbsp;<span class="glyphicon glyphicon-off"></span> 注销登陆</a></li>
                    </ul>
                </li>
                <!-- 主题 换肤-->
                <li class="dropdown"><a href="#" class="dropdown-toggle theme purple" data-toggle="dropdown"><i class="fa fa-tree"></i></a>
                    <ul class="dropdown-menu" role="menu" id="bjui-themes">
                        <li><a href="javascript:;" class="theme_default" data-toggle="theme" data-theme="default">&nbsp;<i class="fa fa-tree"></i> 黑白分明&nbsp;&nbsp;</a></li>
                        <li><a href="javascript:;" class="theme_orange" data-toggle="theme" data-theme="orange">&nbsp;<i class="fa fa-tree"></i> 橘子红了</a></li>
                        <li class="active"><a href="javascript:;" class="theme_purple" data-toggle="theme" data-theme="purple">&nbsp;<i class="fa fa-tree"></i> 紫罗兰</a></li>
                        <li><a href="javascript:;" class="theme_blue" data-toggle="theme" data-theme="blue">&nbsp;<i class="fa fa-tree"></i> 青出于蓝</a></li>
                        <li><a href="javascript:;" class="theme_green" data-toggle="theme" data-theme="green">&nbsp;<i class="fa fa-tree"></i> 绿草如茵</a></li>
                    </ul>
                </li>
            </ul>
        </nav>
    </header>

   
    <div class="bjui-leftside" id="bjui-leftside">
        <div id="bjui-sidebar-s">
            <div class="collapse">
                <div class="toggleCollapse"><div title="展开菜单"><i class="fa fa-angle-double-right"></i></div></div>
            </div>
        </div>
        <div id="bjui-sidebar">
            <div class="toggleCollapse"><h2>主菜单</h2><div title="收缩菜单"><i class="fa fa-angle-double-left"></i></div></div>
            <div class="panel-group panel-main" data-toggle="accordion" id="bjui-accordionmenu" data-heightbox="#bjui-sidebar" data-offsety="26">
                <div class="panel panel-default">
                    <div class="panel-heading panelContent">
                        <h4 class="panel-title">
                        	<a data-toggle="collapse" data-parent="#bjui-accordionmenu" href="#bjui-collapse0" class="active">
                        	<i class="fa fa-caret-square-o-down"></i>&nbsp;泰安答题系统</a>
                        </h4>
                    </div>
                    <div id="bjui-collapse0" class="panel-collapse panelContent collapse in">
                        <div class="panel-body">
                            <c:choose>
							<c:when test="${not empty menulist}">
								<ul id="bjui-tree0" class="ztree ztree_main" data-toggle="ztree" data-on-click="MainMenuClick" data-expand-all="true">
									<c:forEach items="${menulist}" varStatus="vs" var="menu1">
										<c:if test="${fn:length(menu1.menuId)==1}">
											<li data-id="${menu1.menuId}" data-pid="${menu1.pId}" >
											${menu1.name}</li>
										</c:if>
										<c:if test="${fn:length(menu1.menuId)==4}">
											<li data-id="${menu1.menuId}" data-pid="${menu1.pId}" data-url="${menu1.url}" data-tabid="${menu1.rel}">
											${menu1.name}</li>
										</c:if>
									</c:forEach>
								</ul>
							</c:when>
							<c:otherwise>
							</c:otherwise>
							</c:choose>
                        </div>
                    </div>
                    <div class="panelFooter"><div class="panelFooterContent"></div></div>
                </div>
                <%--<div class="panel panel-default">
                    <div class="panel-heading panelContent">
                        <h4 class="panel-title"><a data-toggle="collapse" data-parent="#bjui-accordionmenu" href="#bjui-collapse1" class="" style="color:#FF1100;">
						<i class="fa fa-caret-square-o-right"></i>&nbsp;简要文档</a></h4>
                    </div>
                    <div id="bjui-collapse1" class="panel-collapse panelContent collapse">
                        <div class="panel-body">
                            <ul id="bjui-tree1" class="ztree ztree_main" data-toggle="ztree" data-on-click="MainMenuClick" data-expand-all="false">
                                <li data-id="99" data-pid="0">文件列表</li>
                                <li data-id="100" data-pid="99" data-url="doc/base/filelist.html" data-tabid="doc-file">文件详解</li>
                                <li data-id="1" data-pid="0">框架介绍</li>
                                <li data-id="10" data-pid="1" data-url="doc/base/structure.html" data-tabid="doc-base">页面结构</li>
                                <li data-id="11" data-pid="1" data-url="doc/base/navtab.html" data-tabid="doc-base">标签工作区(navtab)</li>
                            </ul>
                        </div>
                    </div>
                    <div class="panelFooter"><div class="panelFooterContent"></div></div>
                </div>
            --%></div>
        </div>
    </div>
    <div id="bjui-container">
        <div id="bjui-navtab" class="tabsPage">
            <div class="tabsPageHeader">
                <div class="tabsPageHeaderContent">
                    <ul class="navtab-tab nav nav-tabs">
                        <li data-tabid="main" class="main active"><a href="javascript:;"><span><i class="fa fa-home"></i> #maintab#</span></a></li>
                    </ul>
                </div>
                <div class="tabsLeft"><i class="fa fa-angle-double-left"></i></div><!-- dwz中禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
                <div class="tabsRight"><i class="fa fa-angle-double-right"></i></div>
                <div class="tabsMore"><i class="fa fa-angle-double-down"></i></div>
            </div>
            <ul class="tabsMoreList">
                <li><a href="javascript:;">#maintab#</a></li>
            </ul>
            <div class="navtab-panel tabsPageContent layoutBox">
                <div class="page unitBox">
                    <div class="bjui-pageHeader" style="background:#FFF;">
                        <div style="padding: 0 5px; border-bottom: 1px #DDD solid;">
                            <h4>B-JUI 前端框架 　　<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=0047455f3845597286edd381d54076b1e10a45c0c735115f0ee74961f70880af"><img border="0" src="images/group.png" alt="[B-JUI]Bootstrap4DWZ交流群" title="[B-JUI]Bootstrap4DWZ交流群" style="vertical-align:top;"></a></h4>
                        </div>
                    </div>
                    <div class="bjui-pageFormContent" data-layout-h="240">
                        <div style="position: absolute;top:10px;right:0;width:300px;">
                            <iframe width="100%" height="550" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=0&skin=1&isTitle=1&noborder=1&isWeibo=1&isFans=0&uid=2838273614&verifier=75a3b95b&dpc=1"></iframe>
                        </div>
                        <div style="margin-right:300px; overflow: hidden;">
                            <div class="row" style="padding: 0 8px;">
                                <div class="col-md-12">
                                    <div class="panel panel-default">
                                        <div class="panel-heading"><h3 class="panel-title">历史版本</h3></div>
                                        <div class="panel-body">
                                            <table class="table table-condensed table-striped table-hover" width="100%">
                                                <thead>
                                                    <tr>
                                                        <th>版本号</th>
                                                        <th>发布日期</th>
                                                        <th>在线DEMO</th>
                                                        <th>下载地址</th>
                                                        <th>描述</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>1.0 beta</td>
                                                        <td>2014.10.31</td>
                                                        <td>http://b-jui.com/</td>
                                                        <td>http://git.oschina.net/xknaan/B-JUI</td>
                                                        <td>全新的前端框架B-JUI，全Bootstrap插件式的组合，仅借鉴了DWZ的思想，功能已全部重写。</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer id="bjui-footer">Copyright &copy; 2014 - 2015 　<a href="http://www.huanze.net/" target="_blank">山东环泽软件信息有限责任公司</a>　
    </footer>
</body>
</html>